ostbuild: Make resolve fully expand config-opts, delete now-unnecessary vcsconfig
authorColin Walters <walters@verbum.org>
Wed, 22 Feb 2012 20:17:42 +0000 (15:17 -0500)
committerColin Walters <walters@verbum.org>
Wed, 22 Feb 2012 20:17:42 +0000 (15:17 -0500)
The source manifest format allows for compression, but it's more
convenient for consuming code if it's fully expanded in one place.

src/ostbuild/pyostbuild/builtin_resolve.py

index 408f316aaf1ebea041a522838a8aa73ca97f01f4..7a1ec90ac9ff784aca8d0ade535a99cea8b05608 100755 (executable)
@@ -168,6 +168,17 @@ class OstbuildResolve(builtins.Builtin):
                                                           component['branch'])
             component['revision'] = revision
 
+            if 'component' not in component:
+                component['component'] = 'runtime'
+
+            config_opts = list(self.manifest['config-opts'])
+            config_opts.extend(component.get('config-opts', []))
+            component['config-opts'] = config_opts
+
+        # We expand these two keys
+        del self.manifest['config-opts']
+        del self.manifest['vcsconfig']
+
         mirror_gitconfig_path = os.path.join(self.mirrordir, 'gitconfig')
         git_mirrordir = os.path.join(self.mirrordir, 'git')
         f = open(mirror_gitconfig_path, 'w')